﻿using System.Web.Mvc;
using System.Web.Routing;
using Nop.Web.Framework.Mvc.Routes;

namespace Nop.Plugin.DiscountRules.CustomerRoles
{

    /// <summary>
    /// 注册插件可访问的路由地址
    /// </summary>
    public partial class RouteProvider : IRouteProvider
    {
        /// <summary>
        /// 注册路由
        /// </summary>
        /// <param name="routes"></param>
        public void RegisterRoutes(RouteCollection routes)
        {
            routes.MapRoute("Plugin.DiscountRules.CustomerRoles.Configure",
                 "Plugins/DiscountRulesCustomerRoles/Configure",
                 new { controller = "DiscountRulesCustomerRoles", action = "Configure" },
                 new[] { "Nop.Plugin.DiscountRules.CustomerRoles.Controllers" }
            );
        }

        /// <summary>
        /// 优先级
        /// </summary>
        public int Priority
        {
            get
            {
                return 0;
            }
        }
    }
}
